package o;

import android.content.Context;
import androidx.annotation.NonNull;

public class bov {
    private final bpr ˎ;

    public bov(@NonNull Context context, @NonNull bpr o_bpr) {
        this.ˎ = o_bpr;
    }

    public void ˏ(@NonNull String str, int i) {
        boc.ˎ.ˋ("CancelInstallHandler", "cancelInstall, pkgName: " + str + ", sessionId: " + i);
        if (ccx.ॱ()) {
            bol ˋ = bor.ˎ().ˋ(i);
            if (ˋ == null || !ˋ.ˋ().equals(str)) {
                this.ˎ.ॱ(7, "Not found the session, pkgName: " + str + ", sessionId: " + i);
                return;
            } else if (!ˋ.ʼ()) {
                this.ˎ.ॱ(7, "Non 'startInstall' session, pkgName: " + str + ", sessionId: " + i);
                return;
            } else if (ˋ.ʻ() == 11 && ˋ.ᐝ()) {
                this.ˎ.ॱ(1, "Installation has started and cannot be cancelled.");
                return;
            } else {
                bof.ˏ().ˋ(ˋ.ʽ());
                bof.ˋ().ˏ(ˋ.ॱॱ(), ˋ.ˋ());
                bpi.ˎ().ˎ(i);
                bor.ˎ().ˊ(i);
                this.ˎ.ˋ(i);
                return;
            }
        }
        this.ˎ.ॱ(5, "Not signed the agreement.");
    }
}
